package cn.com.cennavi.bean;

import java.io.Serializable;

/**
 * 
 * @ClassName: MineLabODNumOfTrajectoryBean
 * @Description: TODO(OD模块所需要的的数据规格)
 * @author buf
 * @date 2017年2月7日 下午2:15:40
 *
 */
public class MineLabODBean implements Serializable {
	private static final long serialVersionUID = 1L;
	public String dataSourse;
	public double oLongitude;
	public double oLatitude;
	public double dLongitude;   
	public double dLatitude;
	public long oTime;
	public long dTime;

	public double getOLongitude() {
		return oLongitude;
	}

	public double getOLatitude() {
		return oLatitude;
	}

	public double getDLongitude() {
		return dLongitude;
	}

	public double getDLatitude() {
		return dLatitude;
	}

	public long getOTime() {
		return oTime;
	}

	public long getDTime() {
		return dTime;
	}

	public static void main(String[] args) {
		String line = "11000003_1451638129_11000003_1000100454,11000003,11000003_1000100454,2,566035|592787|592786|566033|566025|566023|565731|683937|683938|566007|586110|575081|577692|575082|579158|574781|583394|580934|580933|87757897|87757896|12566911|49143253|49143252|577460|680109|680106|579510|667172|667171|683929|582331|681572|681570|666976|666975|666974|577428|678789|671460|666982|87757892|87757893|577764|680899|682343|680887|687267|682410|682412|87757995|87757996|662939|662940|662944|662945|682377|682378|682381|682383|662949|662950|583118|583123|-694775|-694773|-49143338|-49143337|-702443|-580701|684599|12634794|12634793|684601|684600|664387|700873|700865|700866|680335|678761|680946|680947|671616|671617|681691|13248239|13248240|12634779|12634780|12634776|587928|672322|672325|672320|680939|665823|665826|674872|577682|674875|674876|567258|87757880|87757881|680937|680938|13208410|13208411|679526|686221|686222|-565698,59567321|59567330|59567321|59567303,595673,110000,1451638129|1451638130|1451638138|1451638143|1451638147|1451638162|1451638163|1451638165|1451638175|1451638177|1451638181|1451638186|1451638206|1451638207|1451638209|1451638229|1451638233|1451638233|1451638238|1451638242|1451638244|1451638259|1451638280|1451638281|1451638290|1451638292|1451638296|1451638300|1451638305|1451638309|1451638311|1451638314|1451638315|1451638319|1451638322|1451638326|1451638327|1451638330|1451638333|1451638364|1451638376|1451638378|1451638379|1451638391|1451638408|1451638409|1451638410|1451638412|1451638415|1451638421|1451638422|1451638425|1451638430|1451638440|1451638442|1451638444|1451638460|1451638476|1451638488|1451638512|1451638520|1451638533|1451638538|1451638540|1451638552|1451638554|1451638596|1451638601|1451638630|1451638633|1451638647|1451638658|1451638663|1451638675|1451638679|1451638684|1451638699|1451638699|1451638724|1451638727|1451638729|1451638730|1451638734|1451638734|1451638740|1451638746|1451638761|1451638771|1451638779|1451638785|1451638795|1451638798|1451638799|1451638821|1451638825|1451638829|1451638830|1451638870|1451638901|1451638918|1451638923|1451638941|1451638955|1451638997|1451639017|1451639019|1451639022|1451639023|1451639029|1451639041|1451639052|1451639060|1451639070,13|13|18|18|37|54|54|22|13|13|13|20|41|41|38|35|48|48|48|48|48|48|48|36|32|32|32|32|32|32|32|32|32|32|32|32|32|28|22|34|34|34|34|34|34|34|34|34|34|23|21|21|21|21|21|21|21|21|21|21|17|16|16|16|16|16|16|17|20|20|20|20|28|43|43|43|43|31|42|42|42|42|42|42|44|42|23|24|27|31|34|34|34|34|34|34|16|9|8|8|8|8|13|35|35|35|35|35|35|36|36|31|5,4|29|24|22|151|19|34|59|9|14|17|112|16|23|204|42|8|55|59|24|207|272|14|90|18|42|28|53|33|20|24|8|33|35|28|12|31|20|192|116|18|8|112|160|6|12|23|25|59|4|19|28|59|10|10|93|96|65|140|45|67|22|8|53|9|182|24|137|14|80|59|29|95|47|50|182|7|211|39|29|9|42|8|63|71|173|68|56|43|83|29|14|205|39|36|8|175|79|39|11|42|30|152|196|16|32|5|62|117|108|78|85|14,113,1,0,6725,951,25,566035,-565698,1.0,1.0,1.0,116.4630796,39.9455181,116.4162598,39.9511745,1451638129,1451639081,11646307:3994551:20:1451638129:-88|-48:2:25:9:-83|-103:7:17:19:-4|-111:97:49:30:1|-107:218:42:39:-1|-103:262:0:49:358|-111:328:20:72:0|-113:405:36:80:358|-112:511:47:90:-4|-110:555:38:94:358|-124:628:24:104:-40|-620:1077:56:154:-48|-1002:1338:28:203:26|-966:1393:28:213:51|-896:1436:22:223:160|-884:1408:9:233:-140|-931:1356:42:243:216|-1302:1022:8:293:-135|-1782:642:10:395:-134|-2153:366:0:495:-137|-2365:191:45:543:-146|-2576:-57:24:571:-92|-2686:-62:44:581:268|-2817:-63:33:595:-38|-2902:18:38:610:3|-2894:127:47:620:0|-2892:228:44:628:-21|-2929:313:22:640:328|-2947:333:9:648:-24|-2955:343:17:651:322|-2993:411:29:661:-86|-3530:435:14:711:-93|-3688:428:0:761:-92|-3953:420:28:861:-92|-4535:402:43:912:-90|-4652:401:19:922:-13|-4675:475:39:932:8|-4661:544:9:942:-36|-4682:566:0:952:-36,566035:1:15:116.46295:39.94562:1451638129|592787:28:3:116.46260:39.94556:1451638138|592786:23:22:116.46231:39.94556:1451638148|566025:2:0:116.46205:39.94558:1451638148|566025:102:7:116.46205:39.94648:1451638159|683937:32:4:116.46206:39.94769:1451638168|586110:16:56:116.46207:39.94829:1451638201|575081:55:8:116.46207:39.94879:1451638201|579158:108:9:116.46207:39.95062:1451638219|574781:38:1:116.46182:39.95178:1451638233|583394:0:3:116.46180:39.95181:1451638233|580934:0:10:116.46178:39.95188:1451638233|49143253:13:25:116.45709:39.95612:1451638283|49143252:25:0:116.45687:39.95628:1451638283|577428:10:1:116.45304:39.95890:1451638332|577428:20:60:116.45304:39.95898:1451638342|678789:58:6:116.45346:39.95940:1451638342|678789:136:2:116.45410:39.95986:1451638352|678789:171:1:116.45425:39.95959:1451638362|671460:57:56:116.45378:39.95902:1451638342|671460:0:52:116.45422:39.95941:1451638352|671460:0:20:116.45422:39.95941:1451638362|682410:58:2:116.45008:39.95574:1451638422|682412:1:1:116.45007:39.95573:1451638422|87757995:0:3:116.45005:39.95571:1451638422|682383:44:22:116.44548:39.95205:1451638524|662949:23:4:116.44528:39.95191:1451638524|-49143337:99:0:116.44155:39.94917:1451638624|12634794:28:48:116.43976:39.94777:1451638672|12634793:47:2:116.43940:39.94744:1451638672|684601:0:46:116.43905:39.94711:1451638672|664387:181:7:116.43741:39.94495:1451638700|700873:5:7:116.43738:39.94491:1451638700|700865:4:6:116.43732:39.94489:1451638700|700865:210:4:116.43492:39.94485:1451638724|700866:0:4:116.43490:39.94484:1451638724|680947:7:48:116.43396:39.94527:1451638739|671616:48:1:116.43407:39.94570:1451638739|671617:0:14:116.43410:39.94583:1451638739|681691:35:2:116.43417:39.94679:1451638749|681691:147:1:116.43417:39.94780:1451638757|13248240:36:2:116.43362:39.94887:1451638777|12634780:33:3:116.43318:39.94964:1451638790|665823:93:0:116.42777:39.94986:1451638840|665826:53:0:116.42620:39.94980:1451638890|567258:79:1:116.42354:39.94970:1451638990|13208411:112:1:116.41772:39.94952:1451639041|679526:0:4:116.41767:39.94952:1451639041|679526:95:5:116.41655:39.94948:1451639051|686221:5:13:116.41640:39.94953:1451639051|686221:77:10:116.41637:39.95018:1451639061|686222:9:3:116.41637:39.95027:1451639061|686222:82:9:116.41654:39.95090:1451639071|-565698:8:0:116.41647:39.95096:1451639071|-565698:14:25:116.41640:39.95097:1451639081";
		MineLabODBean td = new MineLabODBean();
		new MineLabODBean().parseData(line, td);
		System.out.println(td.getDLatitude());
	}

	public String toDataString() {
		// TODO Auto-generated method stub
		StringBuffer sb = new StringBuffer();
		sb.append(this.oLongitude);
		sb.append(",");
		sb.append(this.oLatitude);
		sb.append(",");
		sb.append(this.dLongitude);
		sb.append(",");
		sb.append(this.dLatitude);
		sb.append(",");
		sb.append(this.oTime);
		sb.append(",");
		sb.append(this.dTime);
		sb.append(",");
		sb.append(this.dataSourse);
		return sb.toString();
	}

	public void parseData(String line, MineLabODBean td) {
		// TODO Auto-generated method stub
		String[] lineArr = line.split(",");
		if (lineArr.length != 6) {
			return;
		} else {
			td.oLongitude = Double.parseDouble(lineArr[0]);
			td.oLatitude = Double.parseDouble(lineArr[1]);
			td.dLongitude = Double.parseDouble(lineArr[2]);
			td.dLatitude = Double.parseDouble(lineArr[3]);
			td.oTime = Long.parseLong(lineArr[4]);
			td.dTime = Long.parseLong(lineArr[5]);
		}
	}

	public String getDataSourse() {
		// TODO Auto-generated method stub
		return this.dataSourse;
	}

}